import Vue from 'vue'
import Vuex from 'vuex'

import createPersistedState from 'vuex-persistedstate'

import { user } from './modules'
Vue.use(Vuex)

export default new Vuex.Store({
  modules: {
    user
  },
  // 需要本地存储的数据
  plugins: [
    createPersistedState({
      key: 'zbshop',
      paths: ['user']
    })
  ]
})
